<?php

	if(!defined('YMT')) exit;

	/**
	 * @package Yomm
	 * @author bsuter
	 *
	 */
	Class Yomm_Db_Plugin_Delete Extends Yomm_Db_Plugins {
		
		private $data = null;
		
		public function __construct($table, $indicator, $indicator_value = null)
		{
			if(is_null($indicator_value))
			{
				$this->data = "DELETE FROM `$table` WHERE $indicator";
			} else {
				$this->data = "DELETE FROM `$table` WHERE $indicator='$indicator_value'";
			}
			
		}
		
		public function returnValue()
		{
			return self::$mysqli->query($this->data);
		}
		
	}